import { _decorator,Component,Label, Sprite, SpriteFrame,Node} from "cc";
import { GameResult } from "../Cmd/GameResult";
import { Utils } from "../Common/Utils";
import { RankingResult } from "../Cmd/RankingResult";
const { ccclass, property } = _decorator;
@ccclass
export  class MatchRankingItem extends Component {
   
   
    @property(Label)
    private Ranking!:Label;

    @property(Label)
    private Name!:Label;

    @property(Label)
    private Point!:Label;

    public setData(data: any) {
        const itemData = data as RankingResult;
        this.Ranking.string =itemData.rankingId+'';
        this.Name.string =itemData.name +'';
        this.Point.string = Utils.num1000(itemData.scorePoints) ; 
        
    }
}